# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: leon

from typing import List, Union

from coin.exchange.hitbtc_v2.ws.subscriber import SubscriberBase
from coin.exchange.huobi.ws.subscriber import TopicPatterns


class BequantSubscriber(SubscriberBase):
  def __init__(self,
               queue,
               group_id: str,
               worker_id: str,
               symbol: Union[List[str], str],
               close_callback=None,
               logger=None):
    self._topics = TopicPatterns(
        depth='bequant_ws_depth',
        trade='bequant_ws_trade',
        topic_event='bequant_ws_topic_event',
        delta_depth=None,
    )
    super().__init__(queue, group_id, worker_id, symbol, close_callback, logger)
    self._register_url('wss://api.bequant.io/api/2/ws')
